﻿@{
    Layout = null;
}
@model List<HotelMgr.Models.Room>
@foreach (var room in Model)
{
    
    <div class="roomBox fn-left @("state"+room.RoomStateID)">
        <p class="title">
            <input type="checkbox" name="roomID" id="@String.Format("room{0}",room.RoomID)" value="@room.RoomID"@(room.RoomStateID!=1?"disabled = \"disabled\"":"") />
            <label for="@String.Format("room{0}",room.RoomID)">
                Room @room.RoomID</label>
        </p>
        @*<div class="current-price">
            现价：
            @{ Html.Telerik().NumericTextBox()
                       .Name("Room" + room.RoomID)
                       .Spinners(true)
                       .IncrementStep(5)
                       .HtmlAttributes(new { })
                       .InputHtmlAttributes(new { @class = "currentPrice", style = "display:inline;" })
                       .Value(Convert.ToDouble(room.Price)).MinValue(0.01).MaxValue(1000)
                       .Render(); }
        </div>*@
        <div class="room-detail">
            <p class="title">
                Room @room.RoomID</p>
            <p class="type">
                类型：@room.RoomType.TypeName</p>
            <p class="status">
                状态：@room.RoomState.Name</p>
            <p class="price">
                原价：@room.Price</p>
        </div>
    </div>
}
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.form.js")"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#roomInfoForm').ajaxForm(function (data) {
            $("#roomList").html(data);
        });
    });
    function chooseRooms() {
        var result = "";
        $("input[name='roomID']:checked").each(function (i, e) {
            result += $(e).val() + ";";
        });
        $("#txtRoomList").val(result);
        windowRoomListClose();
    }
</script>